package com.han.responsibility;

/**
 * @ClassName Client
 * @Description 描述该类的功能
 * @Author duoduo Han
 * @Date 2024/6/14 10:44
 */
public class Client {
    public static void main(String[] args) {
        //创建请假条
        LeaveRequest leave = new LeaveRequest("韩朵朵", 5, "回家");

        //创建各级领导对象
        GroupLeader groupLeader = new GroupLeader();
        Manager manager = new Manager();
        GeneralManager generalManager = new GeneralManager();

        //设置处理者链条
        groupLeader.setNextHandler(manager);
        manager.setNextHandler(generalManager);

        //小明提交请假申请
        groupLeader.submit(leave);

    }
}
